package cn.bdqn.demo.seckill;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
public class StockBean {
    @Value("${product.init.stock}")
    private int initStock;
    @Value("${product.id}")
    private String productId;
   /* @Bean
    StockBean stockBean() {
        StockBean stockBean = new StockBean();
        stockBean.setInitStock(initStock);
        stockBean.setProductId(productId);
        return stockBean;
    }*/

    public int getInitStock() {
        return initStock;
    }

    public void setInitStock(int initStock) {
        this.initStock = initStock;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }
}
